#include "dominion.h"
#include "dominion_helpers.h"
#include "rngs.h"
#include <stdio.h>
#include <math.h>
#include <stdlib.h>

void test_updateCoins();

void test_updateCoins(){
	struct gameState *state = newGame();

	state->handCount[0] = 5;
	state->hand[0][0] = 5;
	state->hand[0][1] = 5;
	state->hand[0][3] = 6;
	state->hand[0][4] = 7;
	state->hand[0][5] = 12;
	state->coins = 0;

	updateCoins(0,state,3); //Run tested function

	if(state->coins == 10){
		printf("updateCoins(): PASS with 3 bonus coins and state->coins = 0\n");
	}
	else{
		printf("updateCoins(): FAIL with 3 bonus coins and state->coins = 0\n");
	}

	state->coins = 3; //Set coins value

	updateCoins(0,state,0); //Run tested function

	if(state->coins == 10){
		printf("updateCoins(): PASS with 0 bonus coins and state->coins = 3\n");
	}
	else{
		printf("updateCoins(): FAIL with 0 bonus coins and state->coins = 3\n");
	}
}


int main(int argc, char *argv[]){
        test_updateCoins();
        return 0;
}
	
